package wman.patterns.singleton;

/**
 * @ProjectName: wman
 * @Package: wman.patterns.singleton
 * @ClassName: Singleton1
 * @Description: java类作用描述
 * @Author: wman
 * @CreateDate: 2020/1/2 10:07
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/1/2 10:07
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
class Singleton2 {
    private static Singleton2 ourInstance = new Singleton2();

    static Singleton2 getInstance() {
        if(ourInstance == null){
            ourInstance = new Singleton2();
        }
        return ourInstance;
    }

    private Singleton2() {
    }
}
